package com.group.mall.controller;

import com.group.mall.domain.POJO.Evaluation;
import com.group.mall.service.EvaluationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/eva")
@Slf4j
public class EvaluationController{

    @Autowired
    private EvaluationService evaluationService;
    //新增评论
    @PostMapping("/addEva")
    public boolean addEva(Evaluation evaluation){
        log.info("新增评论:{}",evaluation);
        Boolean result = evaluationService.addEva(evaluation);
        return result;
    }
}
